<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>验证码</title>
</head>
<script>
    window.onload=function () {
        document.getElementById("img").onclick=function () {
            img.src="/checkCodeServlet?"+new Date().getTime()
        }
        document.getElementById("change").onclick=function () {

            img.src="/checkCodeServlet?"+new Date().getTime()
        }
    }
</script>
<body>
<img src="/+checkCodeServlet"id="img">
<a href="javaScript:void(0)" id="change">看不清，换一张</a>
</body>
</html>